﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Component;
using  DevExpress.Xpo;

public partial class FrontEnd_Body_Left_SpecialProduct : System.Web.UI.UserControl
{
    public XPCollection<Product> ads=null;
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    // show cac san pham moi
    public string Show_New_Products()
    {
        string temp = "";
        XPCollection<Product> re = ProductDB.GetAllSpecialProduct(false);
        if (re != null)
        {
            foreach (Product pro in re)
            {
              temp+="<div class=\"special_product_img\">";
                           temp+= "<img src=\""+pro.Img+"\" /></div><div class=\"special_product_name\">";
                      
                            temp+="<a href=\""+pro.UrlDetailFronent+"\">"+Component.ProductDB.GetContentByLanguage(pro.Name,pro.NameEL)+"</a></div>";                   
            }
        }
        return temp;
    }
}
